﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ylh.BLL
{
    public class StaffInfoBLL
    {
        private string ConStr = string.Empty;

        public StaffInfoBLL(string ConStr)
        {
            this.ConStr = ConStr;
        }



        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Ylh.Model.TbStaffInfo GetModel(int StaffID)
        {
            Ylh.IDAL.IStaffInfo Info = Ylh.FactoryDAL.DataAccess.CreateIStaffInfo();
            return Info.GetModel(ConStr,StaffID);
            
        }



        /// <summary>
        /// 插入员工详细信息
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="model">员工详细信息</param>
        /// <returns></returns>
        public int InsertIntoStaffInfo( Ylh.Model.TbStaffInfo model)
        {
            Ylh.IDAL.IStaffInfo Info = Ylh.FactoryDAL.DataAccess.CreateIStaffInfo();
            return Info.InsertIntoStaffInfo(ConStr, model);
        }


        /// <summary>
        /// 更新员工详细信息
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="model">员工详细信息对象</param>
        /// <returns></returns>
        public bool UpdateStaffInfo(Ylh.Model.TbStaffInfo model)
        {
            Ylh.IDAL.IStaffInfo Info = Ylh.FactoryDAL.DataAccess.CreateIStaffInfo();
            return Info.UpdateStaffInfo(ConStr, model);
        }


        /// <summary>
        /// 插入员工详细信息
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="model">员工详细信息</param>
        /// <returns></returns>
        public int InsertIntoStaffInfo1(Ylh.Model.TbStaffInfo model)
        {
            Ylh.IDAL.IStaffInfo Info = Ylh.FactoryDAL.DataAccess.CreateIStaffInfo();
            return Info.InsertIntoStaffInfo1(ConStr, model);
        }

    }
}
